package com.example.mapper;

import com.example.entity.User;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface UserRepository extends MongoRepository<User, String> {
    // 自定义查询方法
    User findByEmail(String email); // 根据邮箱查询[2,9](@ref)

    User findByEmailAndPassword(String email, String password);

    User findUserById(String id);

    List<User> findUserByEmail(String email);
}